package com.smartfactory.sail.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.smartfactory.sail.entity.enums.ContractTypeEnum;
import com.smartfactory.sail.entity.enums.OrderItemStatusEnum;
import com.smartfactory.sail.entity.enums.OrderItemTypeEnum;
import com.smartfactory.sail.entity.enums.OrderModelEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 订单产品表
 * </p>
 *
 * @author 王巨壁
 * @since 2019-08-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "OrderItem对象", description = "订单产品表")
public class OrderItem implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "订单id")
    @TableField("orderId")
    private Long orderId;

    @ApiModelProperty(value = "生产编号")
    @TableField("orderCode")
    private String orderCode;

    @ApiModelProperty(value = "产品id")
    @TableField("itemId")
    private Long itemId;

    @ApiModelProperty("用途1订单2生产")
    @TableField("purpose")
    private Integer purpose;

    @ApiModelProperty(value = "合同id")
    @TableField("contractId")
    private Long contractId;

    @ApiModelProperty(value = "订单产品状态")
    private OrderItemStatusEnum status;

    @ApiModelProperty(value = "产品名称")
    @TableField("itemName")
    private String itemName;

    @ApiModelProperty(value = "产品订单数量")
    private Integer size;

    @ApiModelProperty(value = "规格型号")
    private String specification;

    @ApiModelProperty(value = "已发货数量")
    @TableField("shippedSize")
    private Integer shippedSize;

    @ApiModelProperty(value = "已发货次数")
    @TableField("shippedCount")
    private Integer shippedCount;

    @ApiModelProperty(value = "多个生产图纸id用符号|隔开")
    @TableField("productDrawings")
    private String productDrawings;

    @ApiModelProperty(value = "客户图纸多个用|隔开")
    @TableField("custDrawings")
    private String custDrawings;

    @ApiModelProperty(value = "技术图纸")
    @TableField("technicalDrawings")
    private String technicalDrawings;

    @ApiModelProperty(value = "成本单价")
    @TableField("costPrice")
    private Double costPrice;

    @ApiModelProperty(value = "对外报价")
    private Double offer;

    @ApiModelProperty(value = "成本价报价人")
    @TableField("cosPriceUserId")
    private Long cosPriceUserId;

    @ApiModelProperty(value = "销售价报价人")
    @TableField("offerUserId")
    private Long offerUserId;

    @ApiModelProperty(value = "订单模式1.生产订单2修磨订单3外包订单4混合订单具体参考constants表")
    @TableField("orderMode")
    private OrderModelEnum orderMode;

    @ApiModelProperty(value = "下单人id对应userid")
    @TableField("underOrderId")
    private Long underOrderId;

    @ApiModelProperty(value = "交货日期")
    @TableField("deliveryDate")
    private String deliveryDate;

    @ApiModelProperty(value = "客户id")
    @TableField("custId")
    private Long custId;

    @ApiModelProperty(value = "客户名称-客户名称会变动合同中只记录当前名称")
    @TableField("custName")
    private String custName;

    @ApiModelProperty(value = "联系人名称")
    @TableField("contactsName")
    private String contactsName;

    @ApiModelProperty(value = "联系方式")
    @TableField("contactInformation")
    private String contactInformation;

    @ApiModelProperty(value = "企业地址")
    @TableField("custAddr")
    private String custAddr;

    @ApiModelProperty(value = "合同类型")
    @TableField("contractType")
    private ContractTypeEnum contractType;

    @ApiModelProperty(value = "订单类型")
    @TableField("orderType")
    private OrderItemTypeEnum orderType;

    @ApiModelProperty(value = "创建人")
    @TableField("createUser")
    private String createUser;

    @ApiModelProperty(value = "创建时间yyyy-MM-dd HH:mm:ss")
    @TableField("createTime")
    private String createTime;

    @ApiModelProperty(value = "修改人")
    @TableField("updateUser")
    private String updateUser;

    @ApiModelProperty(value = "更新时间yyyy-MM-dd HH:mm:ss")
    @TableField("updateTime")
    private String updateTime;


}
